<template>
  <div id="app">
    <img :src="src" alt="" />
    <p>这是一只可怜的猫</p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      src: "https://scpic.chinaz.net/files/pic/pic9/202003/zzpic23514.jpg",
    };
  },
};
</script>

<style>
#app {
  width: 200px;
  height: 200px;
  border: 1px solid black;
  display: inline-block;
}
img {
  width: 100%;
}
</style>